<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        tr,tr,td{
            border: 2px solid pink;
            border-collapse: collapse;
            text-align: center;
        }
        table{
            border-collapse: collapse;
        }

    </style>

</head>
<body>
    <h2><a href="/add.html">添加学生</a></h2>
    <table border="1" width="500">
        <tr>
            <th>编号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>性别</th>
            <th>地址</th>
            <th>操作</th>
        </tr>

        <c:forEach items="${student}" var="stu">
            <tr>
                <td>${stu.id}</td>
                <td>${stu.name}</td>
                <td>${stu.age}</td>
                <td>${stu.sex}</td>
                <td>${stu.address}</td>
                <td>
                    <a href="/stu/select/">查询</a>
                    <a href="delete?id=${stu.id}">删除</a>
                    <a href="select?id=${stu.id}">修改</a>
                </td>
            </tr>
        </c:forEach>

    </table>
</body>
</html>
